package com.dormitory.management.system.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dormitory.management.system.req.AccessPageReq;
import com.dormitory.management.system.resp.AccessResp;
import com.dormitory.management.system.service.AccessService;
import com.dormitory.managemnet.util.core.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;



/**
 * <p>
 * 门禁表 前端控制器
 * </p>
 *
 * @author
 * @since 2021-12-17
 */
@Api(tags = "门禁管理")
@RestController
@RequestMapping("/access")
public class AccessController {
    @Autowired
    AccessService accessService;

    @ApiOperation("门禁分页列表")
    @RequestMapping(value = "/getPage",method = RequestMethod.POST)
    public Result<IPage<AccessResp>> getPage(@RequestBody AccessPageReq req){
        return Result.ok(accessService.getPage(req));
    }

}
